import { CoachType } from "../types/coach";
import request from "../utils/request";
// 新增教练
export const coachPost=(obj:CoachType)=>{
    return request.post("classes/coachList",obj)
}
// 获取教练
export const coachGet=()=>{
    return request.get("classes/coachList")
}
// 删除教练
export const coachDel=(objectId:string)=>{
    return request.delete(`classes/coachList/${objectId}`)
}

// 获取校区
export const schoolGet=()=>{
    return request.get("classes/school")
}

// 查询教练
export const coach1Get = (coachId:string) => {
    return request.get(`classes/student`, {
        params: {
            where: { coach1: coachId }
        }
    })
}
export const coach2Get = (coachId:string) => {
    return request.get(`classes/student`, {
        params: {
            where: { coach2: coachId }
        }
    })
}
// 获取学员
// export const studentslGet=()=>{
//     return request.get("classes/student")
// }